<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<h1>
    <a href="<c:url value="/forum.form"/>">
        <fmt:message key="app.forum.topic.list"/>
    </a>
    :
    <a href="<c:url value="/topic.form/${command.entry.parent.id}"/>">
        <c:out value="${command.entry.parent.header}"/>
    </a>
    :
    <a href="<c:url value="/post.form/${command.entry.id}"/>">
        <c:out value="${command.entry.header}"/>
    </a>
</h1>


<div class="entry">
    <div class="entry-left">
        <img src="/static-images/pic-post.gif">
    </div>
    <div class="entry-right">
        <div class="entry-header">
            <a href="<c:url value="/post.form/${command.entry.id}"/>">
                <c:out value="${command.entry.header}"/>
            </a>
        </div>
        <div class="entry-data">
            <fmt:message key="app.forum.author"/>:
            <a href="<c:url value="/viewprofile.form/${command.entry.author.username}"/>"><b>${command.entry.author.username}</b></a>
            <fmt:message key="app.forum.date"/>: <b>
            <fmt:formatDate type="both" value="${command.entry.date}"/></b>
        </div>
        <div class="entry-text">
            ${command.entry.text}

        </div>
    </div>
</div>

<form action="<c:url value=""/>" method="post">

    <div class="entry">
        <div class="entry-left">
        </div>
        <div class="entry-right">
            <div class="entry-comment-header">
                <fmt:message key="app.forum.author"/>:
                <a href="<c:url value="/viewprofile.form/${command.parent.author.username}"/>"><b>${command.parent.author.username}</b></a>
                <fmt:message key="app.forum.date"/>: <b>
                <fmt:formatDate type="both" value="${command.parent.date}"/>
                </b>
            </div>
            <div class="entry-text">
                ${command.parent.text}
            </div>
            <div class="entry-comment-add">
                <fmt:message key="app.forum.comment.enter.text"/>
                <spring:bind path="command.text">
                    <c:if test="${status.error}">
                        <p class="error"><fmt:message key="${status.errorCode}"/></p>
                    </c:if>
                    <textarea name="text" rows="20" style="width: 400px;"></textarea>
                </spring:bind>
            </div>
            <input type="submit" name="submit" value="<fmt:message key="app.forum.comment.subimt"/>"/>
        </div>
    </div>
</form>
